/**
	* @author 		Yuri Visser
	* @Created 		
	* @LastUpdated	
	* @Comments		
	* @Notes 		
	* 
**/
package com.theredspace.as3frameworks.puremvc {
	
	import com.theredspace.as3frameworks.puremvc.controller.AddCreatureCommand;
	import com.theredspace.as3frameworks.puremvc.controller.AppStartupCommand;
	
	import org.puremvc.as3.interfaces.IFacade;
	import org.puremvc.as3.patterns.facade.Facade;
	
	public class ApplicationFacade extends Facade implements IFacade {
		
		//-----------------------------------------------------------------------------------
		//---notification name constants >>>
		public static const ADD_CREATURE_TO_LAIR:String					= "addCreatureToLair"; //D:AddCreatureCommand; O:ZoopsPenMediator, AddStartupCreatureCommand
		public static const KILL_ZOOPS:String							= "killZoops"; //D:UberControlMediator; O:ZoopsMediator 
		
		public static const ADD_CLONE_ZOOP:String						= "addCloneZoop"; //D:ZoopMediator; O:ZoopLairMediator
		//---notification name constants <<<
		
		//-----------------------------------------------------------------------------------
		//---command-observed notification name constants>>>
		public static const COM_APP_STARTUP:String						= "appStartup"; //D:this; O:AppStartupCommand
		public static const COM_ADD_CREATURE:String						= "addCreature"; //D:UberControlsMediator; O:AddCreatureCommand
		//---command-observed notification name constants<<<
		
		//-----------------------------------------------------------------------------------
		public static function getInstance():ApplicationFacade {
			if ( instance == null ) instance = new ApplicationFacade();
			return instance as ApplicationFacade;
		}
		
		override protected function initializeController():void {
			super.initializeController();
			
			//---register commands
			registerCommand(COM_APP_STARTUP, AppStartupCommand);
			registerCommand(COM_ADD_CREATURE, AddCreatureCommand);
		}
		
		/**
        * Start the application
        */
        public function startup(app:AS3Frameworks_PureMVC):void {
			sendNotification(COM_APP_STARTUP, app);
        }
	/************************************************************************/   
	}  //END CLASS
 
/****************************************************************************/  
}  //END PACKAGE
